﻿Imports System.Data
Imports System.Data.OleDb
Public Class cakerProfile
    Inherits System.Web.UI.Page
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load


        Dim oleDbConn1 As New OleDb.OleDbConnection(ConfigurationManager.ConnectionStrings("diycakeConnectionString").ConnectionString)
        Dim SqlString1 As String = "SELECT * FROM cakers WHERE userUName=@f1"
        Dim cmd1 As OleDbCommand = New OleDbCommand(SqlString1, oleDbConn1)
        cmd1.CommandType = CommandType.Text
        cmd1.Parameters.AddWithValue("@f1", Request.Params("userUName"))
        oleDbConn1.Open()
        Dim dataReader = cmd1.ExecuteReader()
        lv_mainCake.DataSource = dataReader
        lv_mainCake.DataBind()
        dataReader.Close()
        Dim dataReader2 = cmd1.ExecuteReader()
        lv_title.DataSource = dataReader2
        lv_title.DataBind()
        dataReader2.Close()
        Dim dataReader3 = cmd1.ExecuteReader()
        ParentLv.DataSource = dataReader3
        ParentLv.DataBind()
        dataReader3.Close()
 

    End Sub

    Protected Sub lv_mainCake_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles lv_mainCake.SelectedIndexChanged

    End Sub
    Protected Function getUserAvgRating(ByVal userAvgStar As Integer)

        Dim retval As String
        retval = ""
        For i = 1 To userAvgStar
            retval = retval + "<img src='img/difficulty.png' />"
        Next
        Return retval

    End Function

End Class
